package com.snda.lib;

import com.snda.lib.http.TaskManager;
import android.os.Handler;

public class SNBaseLib {

	private Handler httpTimerHandler = new Handler();

	private static SNBaseLib adManager = new SNBaseLib();

	public static SNBaseLib getInstance() {
		return adManager;
	}

	private SNBaseLib() {
	}

	// 每隔500ms就去取一次列表，发送HTTP请求
	private Runnable runHttpTak = new Runnable() {
		public void run() {
			TaskManager.getInstance().ExecuteTaskReq();
			httpTimerHandler.postDelayed(runHttpTak, 200);
		}
	};

	public void init() {
		httpTimerHandler.post(runHttpTak);
	}

}
